home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / pc / demo / demodata / menu.dxr / 00140.ls < prev    next >
Encoding:
Text File  |  1996-10-02  |  1.1 KB  |  42 lines

  1. on buttonHilite
  2.   global gAbort, gTheclickOn
  3.   puppetSound(0)
  4.   set gAbort to 0
  5.   set gTheclickOn to clickOn()
  6.   set tempName2 to the name of cast the castNum of sprite gTheclickOn
  7.   set tempName to chars(tempName2, 1, length(tempName2) - 5)
  8.   set tempUp to the number of member tempName2
  9.   set tempDown to the number of member (tempName & "_DN")
  10.   set the castNum of sprite gTheclickOn to tempDown
  11.   updateStage()
  12.   sound stop 1
  13.   sound stop 2
  14.   puppetSound("clickSound")
  15.   updateStage()
  16.   repeat while the stillDown
  17.     if rollOver(gTheclickOn) then
  18.       if the castNum of sprite gTheclickOn <> tempDown then
  19.         set the castNum of sprite gTheclickOn to tempDown
  20.         updateStage()
  21.         set gAbort to 0
  22.       end if
  23.       next repeat
  24.     end if
  25.     set the castNum of sprite gTheclickOn to tempUp
  26.     updateStage()
  27.     set gAbort to 1
  28.     go(the frame)
  29.   end repeat
  30.   if not gAbort then
  31.     puppetSound("clickSound")
  32.     updateStage()
  33.     repeat while soundBusy(1)
  34.       nothing()
  35.     end repeat
  36.     updateStage()
  37.     puppetSound(0)
  38.   end if
  39.   set the castNum of sprite gTheclickOn to tempUp
  40.   updateStage()
  41. end
  42.